<template>
  <el-config-provider :locale="appStore.locale" :size="appStore.size">
    <router-view />
  </el-config-provider>
</template>

<script setup lang="ts">
import { RouterView } from 'vue-router'
import { useAppStore } from '@/stores/modules/app'
import { useAuthStore } from '@/stores/modules/auth'
import { computed, onMounted } from 'vue'

const appStore = useAppStore()
const authStore = useAuthStore()
const loginUser = computed(() => authStore.loginUser)
onMounted(() => {
  if (!loginUser.value.userId) {
    authStore.setLoginUser()
  }
})
</script>
